#!/bin/bash # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description - Script to Rename Computer name, hostname and local host name # Parameters - "" # Configuration Type - COMPUTER if [ $# == '1' ]; then computerName="$1" scutil --set ComputerName "$computerName" scutil --set LocalHostName "$computerName" scutil --set HostName "$computerName" else echo "Invalid Arguments - Please refer description of the script" exit 1 fi